var ajax = require('../../utils/ajax.js');
var common = require('../../utils/common.js');
var Base = require('../base.js');
var WxParse = require('../../utils/wxParse/wxParse.js');
var app = getApp();

var MUeditor = function({
  page,
  scope,
  cmpt
}) {
  Base.apply(this, arguments);
  this.init();
}

common.extend(MUeditor, Base);

Object.assign(MUeditor.prototype, {
  init() {
    var _self = this;
    var curScope = this.curScope;
    var cmpt = this.curCmpt;
    var html;

    try {
      html = cmpt.content.dataset.html;
    } catch (e) {}

    WxParse.wxParse('com.' + curScope + '.article', 'html', html, this.curPage, 0);
  },
});

MUeditor.props = {
  name: 'mUeditor'
};

module.exports = MUeditor;